{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Notes:\n",
    " * Run 17 on the TOI targets, comparing BLS with TEV"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['/mnt/tess/astronet/checkpoints/extended_25_run_17/1/AstroCNNModel_extended_20210321_154527',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/2/AstroCNNModel_extended_20210321_161606',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/3/AstroCNNModel_extended_20210321_164646',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/4/AstroCNNModel_extended_20210321_171723',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/5/AstroCNNModel_extended_20210321_174729',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/6/AstroCNNModel_extended_20210321_181710',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/7/AstroCNNModel_extended_20210321_184652',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/8/AstroCNNModel_extended_20210321_191655',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/9/AstroCNNModel_extended_20210321_194703',\n",
       " '/mnt/tess/astronet/checkpoints/extended_25_run_17/10/AstroCNNModel_extended_20210321_201726']"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import os\n",
    "\n",
    "chkpt_root = '/mnt/tess/astronet/checkpoints/extended_25_run_17'\n",
    "data_files = '/mnt/tess/astronet/tfrecords-toi-bls-vs-tev/*'\n",
    "tces_file = '/mnt/tess/astronet/tces-toi-bls-vs-tev.csv'\n",
    "\n",
    "nruns = 10\n",
    "\n",
    "def load_ensemble(chkpt_root, nruns):\n",
    "    checkpts = []\n",
    "    for i in range(nruns):\n",
    "        parent = os.path.join(chkpt_root, str(i + 1))\n",
    "        if not os.path.exists(parent):\n",
    "            break\n",
    "        all_dirs = os.listdir(parent)\n",
    "        if not all_dirs:\n",
    "            break\n",
    "        d, = all_dirs\n",
    "        checkpts.append(os.path.join(parent, d))\n",
    "    return checkpts\n",
    "\n",
    "paths = load_ensemble(chkpt_root, nruns)\n",
    "paths"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Running model 1\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 2\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 3\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 4\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 5\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 6\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 7\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 8\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 9\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n",
      "Running model 10\n",
      "Binary prediction threshold: 0.2152499407880693 (orientative)\n",
      "1515 records\n"
     ]
    }
   ],
   "source": [
    "import getpass\n",
    "import os\n",
    "from astronet import predict\n",
    "import tensorflow as tf\n",
    "\n",
    "\n",
    "def run_predictions(path):\n",
    "    predict.FLAGS = predict.parser.parse_args([\n",
    "      '--model_dir', path,\n",
    "      '--data_files', data_files,\n",
    "      '--output_file', '',\n",
    "    ])\n",
    "\n",
    "    return predict.predict()\n",
    "\n",
    "\n",
    "paths = load_ensemble(chkpt_root, nruns)\n",
    "ensemble_preds = []\n",
    "config = None\n",
    "for i, path in enumerate(paths):\n",
    "    print(f'Running model {i + 1}')\n",
    "    preds, config = run_predictions(path)\n",
    "    ensemble_preds.append(preds)\n",
    "    print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "labels = ['disp_E', 'disp_N', 'disp_J', 'disp_S', 'disp_B']\n",
    "\n",
    "col_e = labels.index('disp_E')\n",
    "# thresh = config.hparams.prediction_threshold\n",
    "# thresh = 0.030485098838860747  # From the validation numbers - maximum thrershold for 100% recall\n",
    "thresh = 0.31245827674871207  # Relaxed to match Liang's precision value"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "agg_preds = {}\n",
    "tic_ids = {}\n",
    "\n",
    "for preds in ensemble_preds:\n",
    "    for row_id in preds.index:\n",
    "        if row_id not in agg_preds:\n",
    "            agg_preds[row_id] = []\n",
    "            tic_ids[row_id] = preds['tic_id'][row_id]\n",
    "\n",
    "        row = preds[preds.index == row_id]\n",
    "        pred_v = row.values[0]\n",
    "        if len(row.values) > 1:\n",
    "            print(f'Warning: duplicate predictions for {row_id}')\n",
    "        if pred_v[col_e] >= thresh:\n",
    "            agg_preds[row_id].append('disp_E')\n",
    "        else:\n",
    "            masked_v = [v if i != col_e else 0 for i, v in enumerate(pred_v)]\n",
    "            agg_preds[row_id].append(preds.columns[np.argmax(masked_v)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "final_preds = []\n",
    "for row_id in list(agg_preds.keys()):\n",
    "    counts = {l: 0 for l in labels}\n",
    "    for e in agg_preds[row_id]:\n",
    "        counts[e] += 1\n",
    "    maxcount = max(counts.values())\n",
    "    counts.update({\n",
    "        'row_id': row_id,\n",
    "        'tic_id': tic_ids[row_id],\n",
    "        'maxcount': maxcount,\n",
    "    })\n",
    "    final_preds.append(counts)\n",
    "\n",
    "final_preds = pd.DataFrame(final_preds).set_index('tic_id')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tic_id</th>\n",
       "      <th>disp_E</th>\n",
       "      <th>disp_N</th>\n",
       "      <th>disp_J</th>\n",
       "      <th>disp_S</th>\n",
       "      <th>disp_B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000106</td>\n",
       "      <td>0.016336</td>\n",
       "      <td>0.999656</td>\n",
       "      <td>0.000410</td>\n",
       "      <td>0.003393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>0.015427</td>\n",
       "      <td>0.999886</td>\n",
       "      <td>0.000118</td>\n",
       "      <td>0.000959</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000504</td>\n",
       "      <td>0.046386</td>\n",
       "      <td>0.998169</td>\n",
       "      <td>0.001177</td>\n",
       "      <td>0.002472</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000009</td>\n",
       "      <td>0.009137</td>\n",
       "      <td>0.999971</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000086</td>\n",
       "      <td>0.023264</td>\n",
       "      <td>0.999718</td>\n",
       "      <td>0.000168</td>\n",
       "      <td>0.001246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000258</td>\n",
       "      <td>0.022865</td>\n",
       "      <td>0.999367</td>\n",
       "      <td>0.000636</td>\n",
       "      <td>0.000821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000102</td>\n",
       "      <td>0.023210</td>\n",
       "      <td>0.999795</td>\n",
       "      <td>0.000072</td>\n",
       "      <td>0.000807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000088</td>\n",
       "      <td>0.020062</td>\n",
       "      <td>0.999612</td>\n",
       "      <td>0.000441</td>\n",
       "      <td>0.001083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000246</td>\n",
       "      <td>0.028025</td>\n",
       "      <td>0.999518</td>\n",
       "      <td>0.000431</td>\n",
       "      <td>0.001365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>296</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000037</td>\n",
       "      <td>0.020676</td>\n",
       "      <td>0.999821</td>\n",
       "      <td>0.000123</td>\n",
       "      <td>0.001264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000102</td>\n",
       "      <td>0.023210</td>\n",
       "      <td>0.999795</td>\n",
       "      <td>0.000072</td>\n",
       "      <td>0.000807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000037</td>\n",
       "      <td>0.020676</td>\n",
       "      <td>0.999821</td>\n",
       "      <td>0.000123</td>\n",
       "      <td>0.001264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000009</td>\n",
       "      <td>0.009137</td>\n",
       "      <td>0.999971</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000088</td>\n",
       "      <td>0.020062</td>\n",
       "      <td>0.999612</td>\n",
       "      <td>0.000441</td>\n",
       "      <td>0.001083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>0.015427</td>\n",
       "      <td>0.999886</td>\n",
       "      <td>0.000118</td>\n",
       "      <td>0.000959</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000246</td>\n",
       "      <td>0.028025</td>\n",
       "      <td>0.999518</td>\n",
       "      <td>0.000431</td>\n",
       "      <td>0.001365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000258</td>\n",
       "      <td>0.022865</td>\n",
       "      <td>0.999367</td>\n",
       "      <td>0.000636</td>\n",
       "      <td>0.000821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000086</td>\n",
       "      <td>0.023264</td>\n",
       "      <td>0.999718</td>\n",
       "      <td>0.000168</td>\n",
       "      <td>0.001246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000504</td>\n",
       "      <td>0.046386</td>\n",
       "      <td>0.998169</td>\n",
       "      <td>0.001177</td>\n",
       "      <td>0.002472</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>297</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000106</td>\n",
       "      <td>0.016336</td>\n",
       "      <td>0.999656</td>\n",
       "      <td>0.000410</td>\n",
       "      <td>0.003393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000246</td>\n",
       "      <td>0.028025</td>\n",
       "      <td>0.999518</td>\n",
       "      <td>0.000431</td>\n",
       "      <td>0.001365</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000086</td>\n",
       "      <td>0.023264</td>\n",
       "      <td>0.999718</td>\n",
       "      <td>0.000168</td>\n",
       "      <td>0.001246</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000102</td>\n",
       "      <td>0.023210</td>\n",
       "      <td>0.999795</td>\n",
       "      <td>0.000072</td>\n",
       "      <td>0.000807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000258</td>\n",
       "      <td>0.022865</td>\n",
       "      <td>0.999367</td>\n",
       "      <td>0.000636</td>\n",
       "      <td>0.000821</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000022</td>\n",
       "      <td>0.015427</td>\n",
       "      <td>0.999886</td>\n",
       "      <td>0.000118</td>\n",
       "      <td>0.000959</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000037</td>\n",
       "      <td>0.020676</td>\n",
       "      <td>0.999821</td>\n",
       "      <td>0.000123</td>\n",
       "      <td>0.001264</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000504</td>\n",
       "      <td>0.046386</td>\n",
       "      <td>0.998169</td>\n",
       "      <td>0.001177</td>\n",
       "      <td>0.002472</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000009</td>\n",
       "      <td>0.009137</td>\n",
       "      <td>0.999971</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.000209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000088</td>\n",
       "      <td>0.020062</td>\n",
       "      <td>0.999612</td>\n",
       "      <td>0.000441</td>\n",
       "      <td>0.001083</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000106</td>\n",
       "      <td>0.016336</td>\n",
       "      <td>0.999656</td>\n",
       "      <td>0.000410</td>\n",
       "      <td>0.003393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000101</td>\n",
       "      <td>0.046217</td>\n",
       "      <td>0.999720</td>\n",
       "      <td>0.000163</td>\n",
       "      <td>0.000368</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000520</td>\n",
       "      <td>0.094937</td>\n",
       "      <td>0.998392</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.001987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001094</td>\n",
       "      <td>0.075371</td>\n",
       "      <td>0.996727</td>\n",
       "      <td>0.001909</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001272</td>\n",
       "      <td>0.096617</td>\n",
       "      <td>0.996773</td>\n",
       "      <td>0.000918</td>\n",
       "      <td>0.001178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000655</td>\n",
       "      <td>0.090814</td>\n",
       "      <td>0.998206</td>\n",
       "      <td>0.000771</td>\n",
       "      <td>0.001062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000706</td>\n",
       "      <td>0.084483</td>\n",
       "      <td>0.997781</td>\n",
       "      <td>0.001013</td>\n",
       "      <td>0.001130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000380</td>\n",
       "      <td>0.079167</td>\n",
       "      <td>0.999088</td>\n",
       "      <td>0.000518</td>\n",
       "      <td>0.000253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000592</td>\n",
       "      <td>0.078516</td>\n",
       "      <td>0.998427</td>\n",
       "      <td>0.001156</td>\n",
       "      <td>0.000787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001046</td>\n",
       "      <td>0.099128</td>\n",
       "      <td>0.998352</td>\n",
       "      <td>0.000567</td>\n",
       "      <td>0.000637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1107</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000226</td>\n",
       "      <td>0.078927</td>\n",
       "      <td>0.998927</td>\n",
       "      <td>0.000722</td>\n",
       "      <td>0.000713</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002748</td>\n",
       "      <td>0.127850</td>\n",
       "      <td>0.992613</td>\n",
       "      <td>0.004440</td>\n",
       "      <td>0.003359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000312</td>\n",
       "      <td>0.038672</td>\n",
       "      <td>0.998893</td>\n",
       "      <td>0.000979</td>\n",
       "      <td>0.000849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001402</td>\n",
       "      <td>0.118758</td>\n",
       "      <td>0.996617</td>\n",
       "      <td>0.001575</td>\n",
       "      <td>0.002447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001948</td>\n",
       "      <td>0.117095</td>\n",
       "      <td>0.994814</td>\n",
       "      <td>0.001789</td>\n",
       "      <td>0.000588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001767</td>\n",
       "      <td>0.066952</td>\n",
       "      <td>0.992080</td>\n",
       "      <td>0.004748</td>\n",
       "      <td>0.001381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000516</td>\n",
       "      <td>0.087754</td>\n",
       "      <td>0.998476</td>\n",
       "      <td>0.000473</td>\n",
       "      <td>0.000884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000438</td>\n",
       "      <td>0.085662</td>\n",
       "      <td>0.998459</td>\n",
       "      <td>0.001080</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000295</td>\n",
       "      <td>0.073352</td>\n",
       "      <td>0.998959</td>\n",
       "      <td>0.001102</td>\n",
       "      <td>0.000495</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000899</td>\n",
       "      <td>0.100380</td>\n",
       "      <td>0.996968</td>\n",
       "      <td>0.001568</td>\n",
       "      <td>0.002388</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1108</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002242</td>\n",
       "      <td>0.141935</td>\n",
       "      <td>0.992814</td>\n",
       "      <td>0.002292</td>\n",
       "      <td>0.002274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000544</td>\n",
       "      <td>0.037780</td>\n",
       "      <td>0.997976</td>\n",
       "      <td>0.002193</td>\n",
       "      <td>0.000954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000662</td>\n",
       "      <td>0.039044</td>\n",
       "      <td>0.997789</td>\n",
       "      <td>0.002097</td>\n",
       "      <td>0.001071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004359</td>\n",
       "      <td>0.053540</td>\n",
       "      <td>0.990638</td>\n",
       "      <td>0.007279</td>\n",
       "      <td>0.001249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001064</td>\n",
       "      <td>0.041538</td>\n",
       "      <td>0.997744</td>\n",
       "      <td>0.002270</td>\n",
       "      <td>0.000834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001008</td>\n",
       "      <td>0.045698</td>\n",
       "      <td>0.997396</td>\n",
       "      <td>0.002146</td>\n",
       "      <td>0.001353</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001536</td>\n",
       "      <td>0.047045</td>\n",
       "      <td>0.995417</td>\n",
       "      <td>0.004952</td>\n",
       "      <td>0.000919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001706</td>\n",
       "      <td>0.052218</td>\n",
       "      <td>0.996452</td>\n",
       "      <td>0.002930</td>\n",
       "      <td>0.001160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.035199</td>\n",
       "      <td>0.997291</td>\n",
       "      <td>0.002392</td>\n",
       "      <td>0.000677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000756</td>\n",
       "      <td>0.036549</td>\n",
       "      <td>0.998183</td>\n",
       "      <td>0.001788</td>\n",
       "      <td>0.001084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1109</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004797</td>\n",
       "      <td>0.031402</td>\n",
       "      <td>0.975602</td>\n",
       "      <td>0.031040</td>\n",
       "      <td>0.000730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000226</td>\n",
       "      <td>0.078927</td>\n",
       "      <td>0.998927</td>\n",
       "      <td>0.000722</td>\n",
       "      <td>0.000713</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000101</td>\n",
       "      <td>0.046217</td>\n",
       "      <td>0.999720</td>\n",
       "      <td>0.000163</td>\n",
       "      <td>0.000368</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000592</td>\n",
       "      <td>0.078516</td>\n",
       "      <td>0.998427</td>\n",
       "      <td>0.001156</td>\n",
       "      <td>0.000787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001272</td>\n",
       "      <td>0.096617</td>\n",
       "      <td>0.996773</td>\n",
       "      <td>0.000918</td>\n",
       "      <td>0.001178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000380</td>\n",
       "      <td>0.079167</td>\n",
       "      <td>0.999088</td>\n",
       "      <td>0.000518</td>\n",
       "      <td>0.000253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000706</td>\n",
       "      <td>0.084483</td>\n",
       "      <td>0.997781</td>\n",
       "      <td>0.001013</td>\n",
       "      <td>0.001130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001046</td>\n",
       "      <td>0.099128</td>\n",
       "      <td>0.998352</td>\n",
       "      <td>0.000567</td>\n",
       "      <td>0.000637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000655</td>\n",
       "      <td>0.090814</td>\n",
       "      <td>0.998206</td>\n",
       "      <td>0.000771</td>\n",
       "      <td>0.001062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000520</td>\n",
       "      <td>0.094937</td>\n",
       "      <td>0.998392</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.001987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1110</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001094</td>\n",
       "      <td>0.075371</td>\n",
       "      <td>0.996727</td>\n",
       "      <td>0.001909</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000516</td>\n",
       "      <td>0.087754</td>\n",
       "      <td>0.998476</td>\n",
       "      <td>0.000473</td>\n",
       "      <td>0.000884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000295</td>\n",
       "      <td>0.073352</td>\n",
       "      <td>0.998959</td>\n",
       "      <td>0.001102</td>\n",
       "      <td>0.000495</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000899</td>\n",
       "      <td>0.100380</td>\n",
       "      <td>0.996968</td>\n",
       "      <td>0.001568</td>\n",
       "      <td>0.002388</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002242</td>\n",
       "      <td>0.141935</td>\n",
       "      <td>0.992814</td>\n",
       "      <td>0.002292</td>\n",
       "      <td>0.002274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000312</td>\n",
       "      <td>0.038672</td>\n",
       "      <td>0.998893</td>\n",
       "      <td>0.000979</td>\n",
       "      <td>0.000849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001948</td>\n",
       "      <td>0.117095</td>\n",
       "      <td>0.994814</td>\n",
       "      <td>0.001789</td>\n",
       "      <td>0.000588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001402</td>\n",
       "      <td>0.118758</td>\n",
       "      <td>0.996617</td>\n",
       "      <td>0.001575</td>\n",
       "      <td>0.002447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000438</td>\n",
       "      <td>0.085662</td>\n",
       "      <td>0.998459</td>\n",
       "      <td>0.001080</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001767</td>\n",
       "      <td>0.066952</td>\n",
       "      <td>0.992080</td>\n",
       "      <td>0.004748</td>\n",
       "      <td>0.001381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1111</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002748</td>\n",
       "      <td>0.127850</td>\n",
       "      <td>0.992613</td>\n",
       "      <td>0.004440</td>\n",
       "      <td>0.003359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004359</td>\n",
       "      <td>0.053540</td>\n",
       "      <td>0.990638</td>\n",
       "      <td>0.007279</td>\n",
       "      <td>0.001249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001706</td>\n",
       "      <td>0.052218</td>\n",
       "      <td>0.996452</td>\n",
       "      <td>0.002930</td>\n",
       "      <td>0.001160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001064</td>\n",
       "      <td>0.041538</td>\n",
       "      <td>0.997744</td>\n",
       "      <td>0.002270</td>\n",
       "      <td>0.000834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000544</td>\n",
       "      <td>0.037780</td>\n",
       "      <td>0.997976</td>\n",
       "      <td>0.002193</td>\n",
       "      <td>0.000954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001008</td>\n",
       "      <td>0.045698</td>\n",
       "      <td>0.997396</td>\n",
       "      <td>0.002146</td>\n",
       "      <td>0.001353</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004797</td>\n",
       "      <td>0.031402</td>\n",
       "      <td>0.975602</td>\n",
       "      <td>0.031040</td>\n",
       "      <td>0.000730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000756</td>\n",
       "      <td>0.036549</td>\n",
       "      <td>0.998183</td>\n",
       "      <td>0.001788</td>\n",
       "      <td>0.001084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000662</td>\n",
       "      <td>0.039044</td>\n",
       "      <td>0.997789</td>\n",
       "      <td>0.002097</td>\n",
       "      <td>0.001071</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001536</td>\n",
       "      <td>0.047045</td>\n",
       "      <td>0.995417</td>\n",
       "      <td>0.004952</td>\n",
       "      <td>0.000919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1112</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.035199</td>\n",
       "      <td>0.997291</td>\n",
       "      <td>0.002392</td>\n",
       "      <td>0.000677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000380</td>\n",
       "      <td>0.079167</td>\n",
       "      <td>0.999088</td>\n",
       "      <td>0.000518</td>\n",
       "      <td>0.000253</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000706</td>\n",
       "      <td>0.084483</td>\n",
       "      <td>0.997781</td>\n",
       "      <td>0.001013</td>\n",
       "      <td>0.001130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001272</td>\n",
       "      <td>0.096617</td>\n",
       "      <td>0.996773</td>\n",
       "      <td>0.000918</td>\n",
       "      <td>0.001178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000655</td>\n",
       "      <td>0.090814</td>\n",
       "      <td>0.998206</td>\n",
       "      <td>0.000771</td>\n",
       "      <td>0.001062</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001094</td>\n",
       "      <td>0.075371</td>\n",
       "      <td>0.996727</td>\n",
       "      <td>0.001909</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001046</td>\n",
       "      <td>0.099128</td>\n",
       "      <td>0.998352</td>\n",
       "      <td>0.000567</td>\n",
       "      <td>0.000637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000520</td>\n",
       "      <td>0.094937</td>\n",
       "      <td>0.998392</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.001987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000592</td>\n",
       "      <td>0.078516</td>\n",
       "      <td>0.998427</td>\n",
       "      <td>0.001156</td>\n",
       "      <td>0.000787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000101</td>\n",
       "      <td>0.046217</td>\n",
       "      <td>0.999720</td>\n",
       "      <td>0.000163</td>\n",
       "      <td>0.000368</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1113</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000226</td>\n",
       "      <td>0.078927</td>\n",
       "      <td>0.998927</td>\n",
       "      <td>0.000722</td>\n",
       "      <td>0.000713</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001948</td>\n",
       "      <td>0.117095</td>\n",
       "      <td>0.994814</td>\n",
       "      <td>0.001789</td>\n",
       "      <td>0.000588</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000312</td>\n",
       "      <td>0.038672</td>\n",
       "      <td>0.998893</td>\n",
       "      <td>0.000979</td>\n",
       "      <td>0.000849</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001767</td>\n",
       "      <td>0.066952</td>\n",
       "      <td>0.992080</td>\n",
       "      <td>0.004748</td>\n",
       "      <td>0.001381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000899</td>\n",
       "      <td>0.100380</td>\n",
       "      <td>0.996968</td>\n",
       "      <td>0.001568</td>\n",
       "      <td>0.002388</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002748</td>\n",
       "      <td>0.127850</td>\n",
       "      <td>0.992613</td>\n",
       "      <td>0.004440</td>\n",
       "      <td>0.003359</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000516</td>\n",
       "      <td>0.087754</td>\n",
       "      <td>0.998476</td>\n",
       "      <td>0.000473</td>\n",
       "      <td>0.000884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000438</td>\n",
       "      <td>0.085662</td>\n",
       "      <td>0.998459</td>\n",
       "      <td>0.001080</td>\n",
       "      <td>0.001363</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001402</td>\n",
       "      <td>0.118758</td>\n",
       "      <td>0.996617</td>\n",
       "      <td>0.001575</td>\n",
       "      <td>0.002447</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000295</td>\n",
       "      <td>0.073352</td>\n",
       "      <td>0.998959</td>\n",
       "      <td>0.001102</td>\n",
       "      <td>0.000495</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1114</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.002242</td>\n",
       "      <td>0.141935</td>\n",
       "      <td>0.992814</td>\n",
       "      <td>0.002292</td>\n",
       "      <td>0.002274</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000756</td>\n",
       "      <td>0.036549</td>\n",
       "      <td>0.998183</td>\n",
       "      <td>0.001788</td>\n",
       "      <td>0.001084</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001005</td>\n",
       "      <td>0.035199</td>\n",
       "      <td>0.997291</td>\n",
       "      <td>0.002392</td>\n",
       "      <td>0.000677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001706</td>\n",
       "      <td>0.052218</td>\n",
       "      <td>0.996452</td>\n",
       "      <td>0.002930</td>\n",
       "      <td>0.001160</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000544</td>\n",
       "      <td>0.037780</td>\n",
       "      <td>0.997976</td>\n",
       "      <td>0.002193</td>\n",
       "      <td>0.000954</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004797</td>\n",
       "      <td>0.031402</td>\n",
       "      <td>0.975602</td>\n",
       "      <td>0.031040</td>\n",
       "      <td>0.000730</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001536</td>\n",
       "      <td>0.047045</td>\n",
       "      <td>0.995417</td>\n",
       "      <td>0.004952</td>\n",
       "      <td>0.000919</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001008</td>\n",
       "      <td>0.045698</td>\n",
       "      <td>0.997396</td>\n",
       "      <td>0.002146</td>\n",
       "      <td>0.001353</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.004359</td>\n",
       "      <td>0.053540</td>\n",
       "      <td>0.990638</td>\n",
       "      <td>0.007279</td>\n",
       "      <td>0.001249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.001064</td>\n",
       "      <td>0.041538</td>\n",
       "      <td>0.997744</td>\n",
       "      <td>0.002270</td>\n",
       "      <td>0.000834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1115</th>\n",
       "      <td>161477033</td>\n",
       "      <td>0.000662</td>\n",
       "      <td>0.039044</td>\n",
       "      <td>0.997789</td>\n",
       "      <td>0.002097</td>\n",
       "      <td>0.001071</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         tic_id    disp_E    disp_N    disp_J    disp_S    disp_B\n",
       "296   161477033  0.000106  0.016336  0.999656  0.000410  0.003393\n",
       "296   161477033  0.000022  0.015427  0.999886  0.000118  0.000959\n",
       "296   161477033  0.000504  0.046386  0.998169  0.001177  0.002472\n",
       "296   161477033  0.000009  0.009137  0.999971  0.000021  0.000209\n",
       "296   161477033  0.000086  0.023264  0.999718  0.000168  0.001246\n",
       "296   161477033  0.000258  0.022865  0.999367  0.000636  0.000821\n",
       "296   161477033  0.000102  0.023210  0.999795  0.000072  0.000807\n",
       "296   161477033  0.000088  0.020062  0.999612  0.000441  0.001083\n",
       "296   161477033  0.000246  0.028025  0.999518  0.000431  0.001365\n",
       "296   161477033  0.000037  0.020676  0.999821  0.000123  0.001264\n",
       "297   161477033  0.000102  0.023210  0.999795  0.000072  0.000807\n",
       "297   161477033  0.000037  0.020676  0.999821  0.000123  0.001264\n",
       "297   161477033  0.000009  0.009137  0.999971  0.000021  0.000209\n",
       "297   161477033  0.000088  0.020062  0.999612  0.000441  0.001083\n",
       "297   161477033  0.000022  0.015427  0.999886  0.000118  0.000959\n",
       "297   161477033  0.000246  0.028025  0.999518  0.000431  0.001365\n",
       "297   161477033  0.000258  0.022865  0.999367  0.000636  0.000821\n",
       "297   161477033  0.000086  0.023264  0.999718  0.000168  0.001246\n",
       "297   161477033  0.000504  0.046386  0.998169  0.001177  0.002472\n",
       "297   161477033  0.000106  0.016336  0.999656  0.000410  0.003393\n",
       "298   161477033  0.000246  0.028025  0.999518  0.000431  0.001365\n",
       "298   161477033  0.000086  0.023264  0.999718  0.000168  0.001246\n",
       "298   161477033  0.000102  0.023210  0.999795  0.000072  0.000807\n",
       "298   161477033  0.000258  0.022865  0.999367  0.000636  0.000821\n",
       "298   161477033  0.000022  0.015427  0.999886  0.000118  0.000959\n",
       "298   161477033  0.000037  0.020676  0.999821  0.000123  0.001264\n",
       "298   161477033  0.000504  0.046386  0.998169  0.001177  0.002472\n",
       "298   161477033  0.000009  0.009137  0.999971  0.000021  0.000209\n",
       "298   161477033  0.000088  0.020062  0.999612  0.000441  0.001083\n",
       "298   161477033  0.000106  0.016336  0.999656  0.000410  0.003393\n",
       "1107  161477033  0.000101  0.046217  0.999720  0.000163  0.000368\n",
       "1107  161477033  0.000520  0.094937  0.998392  0.001005  0.001987\n",
       "1107  161477033  0.001094  0.075371  0.996727  0.001909  0.001363\n",
       "1107  161477033  0.001272  0.096617  0.996773  0.000918  0.001178\n",
       "1107  161477033  0.000655  0.090814  0.998206  0.000771  0.001062\n",
       "1107  161477033  0.000706  0.084483  0.997781  0.001013  0.001130\n",
       "1107  161477033  0.000380  0.079167  0.999088  0.000518  0.000253\n",
       "1107  161477033  0.000592  0.078516  0.998427  0.001156  0.000787\n",
       "1107  161477033  0.001046  0.099128  0.998352  0.000567  0.000637\n",
       "1107  161477033  0.000226  0.078927  0.998927  0.000722  0.000713\n",
       "1108  161477033  0.002748  0.127850  0.992613  0.004440  0.003359\n",
       "1108  161477033  0.000312  0.038672  0.998893  0.000979  0.000849\n",
       "1108  161477033  0.001402  0.118758  0.996617  0.001575  0.002447\n",
       "1108  161477033  0.001948  0.117095  0.994814  0.001789  0.000588\n",
       "1108  161477033  0.001767  0.066952  0.992080  0.004748  0.001381\n",
       "1108  161477033  0.000516  0.087754  0.998476  0.000473  0.000884\n",
       "1108  161477033  0.000438  0.085662  0.998459  0.001080  0.001363\n",
       "1108  161477033  0.000295  0.073352  0.998959  0.001102  0.000495\n",
       "1108  161477033  0.000899  0.100380  0.996968  0.001568  0.002388\n",
       "1108  161477033  0.002242  0.141935  0.992814  0.002292  0.002274\n",
       "1109  161477033  0.000544  0.037780  0.997976  0.002193  0.000954\n",
       "1109  161477033  0.000662  0.039044  0.997789  0.002097  0.001071\n",
       "1109  161477033  0.004359  0.053540  0.990638  0.007279  0.001249\n",
       "1109  161477033  0.001064  0.041538  0.997744  0.002270  0.000834\n",
       "1109  161477033  0.001008  0.045698  0.997396  0.002146  0.001353\n",
       "1109  161477033  0.001536  0.047045  0.995417  0.004952  0.000919\n",
       "1109  161477033  0.001706  0.052218  0.996452  0.002930  0.001160\n",
       "1109  161477033  0.001005  0.035199  0.997291  0.002392  0.000677\n",
       "1109  161477033  0.000756  0.036549  0.998183  0.001788  0.001084\n",
       "1109  161477033  0.004797  0.031402  0.975602  0.031040  0.000730\n",
       "1110  161477033  0.000226  0.078927  0.998927  0.000722  0.000713\n",
       "1110  161477033  0.000101  0.046217  0.999720  0.000163  0.000368\n",
       "1110  161477033  0.000592  0.078516  0.998427  0.001156  0.000787\n",
       "1110  161477033  0.001272  0.096617  0.996773  0.000918  0.001178\n",
       "1110  161477033  0.000380  0.079167  0.999088  0.000518  0.000253\n",
       "1110  161477033  0.000706  0.084483  0.997781  0.001013  0.001130\n",
       "1110  161477033  0.001046  0.099128  0.998352  0.000567  0.000637\n",
       "1110  161477033  0.000655  0.090814  0.998206  0.000771  0.001062\n",
       "1110  161477033  0.000520  0.094937  0.998392  0.001005  0.001987\n",
       "1110  161477033  0.001094  0.075371  0.996727  0.001909  0.001363\n",
       "1111  161477033  0.000516  0.087754  0.998476  0.000473  0.000884\n",
       "1111  161477033  0.000295  0.073352  0.998959  0.001102  0.000495\n",
       "1111  161477033  0.000899  0.100380  0.996968  0.001568  0.002388\n",
       "1111  161477033  0.002242  0.141935  0.992814  0.002292  0.002274\n",
       "1111  161477033  0.000312  0.038672  0.998893  0.000979  0.000849\n",
       "1111  161477033  0.001948  0.117095  0.994814  0.001789  0.000588\n",
       "1111  161477033  0.001402  0.118758  0.996617  0.001575  0.002447\n",
       "1111  161477033  0.000438  0.085662  0.998459  0.001080  0.001363\n",
       "1111  161477033  0.001767  0.066952  0.992080  0.004748  0.001381\n",
       "1111  161477033  0.002748  0.127850  0.992613  0.004440  0.003359\n",
       "1112  161477033  0.004359  0.053540  0.990638  0.007279  0.001249\n",
       "1112  161477033  0.001706  0.052218  0.996452  0.002930  0.001160\n",
       "1112  161477033  0.001064  0.041538  0.997744  0.002270  0.000834\n",
       "1112  161477033  0.000544  0.037780  0.997976  0.002193  0.000954\n",
       "1112  161477033  0.001008  0.045698  0.997396  0.002146  0.001353\n",
       "1112  161477033  0.004797  0.031402  0.975602  0.031040  0.000730\n",
       "1112  161477033  0.000756  0.036549  0.998183  0.001788  0.001084\n",
       "1112  161477033  0.000662  0.039044  0.997789  0.002097  0.001071\n",
       "1112  161477033  0.001536  0.047045  0.995417  0.004952  0.000919\n",
       "1112  161477033  0.001005  0.035199  0.997291  0.002392  0.000677\n",
       "1113  161477033  0.000380  0.079167  0.999088  0.000518  0.000253\n",
       "1113  161477033  0.000706  0.084483  0.997781  0.001013  0.001130\n",
       "1113  161477033  0.001272  0.096617  0.996773  0.000918  0.001178\n",
       "1113  161477033  0.000655  0.090814  0.998206  0.000771  0.001062\n",
       "1113  161477033  0.001094  0.075371  0.996727  0.001909  0.001363\n",
       "1113  161477033  0.001046  0.099128  0.998352  0.000567  0.000637\n",
       "1113  161477033  0.000520  0.094937  0.998392  0.001005  0.001987\n",
       "1113  161477033  0.000592  0.078516  0.998427  0.001156  0.000787\n",
       "1113  161477033  0.000101  0.046217  0.999720  0.000163  0.000368\n",
       "1113  161477033  0.000226  0.078927  0.998927  0.000722  0.000713\n",
       "1114  161477033  0.001948  0.117095  0.994814  0.001789  0.000588\n",
       "1114  161477033  0.000312  0.038672  0.998893  0.000979  0.000849\n",
       "1114  161477033  0.001767  0.066952  0.992080  0.004748  0.001381\n",
       "1114  161477033  0.000899  0.100380  0.996968  0.001568  0.002388\n",
       "1114  161477033  0.002748  0.127850  0.992613  0.004440  0.003359\n",
       "1114  161477033  0.000516  0.087754  0.998476  0.000473  0.000884\n",
       "1114  161477033  0.000438  0.085662  0.998459  0.001080  0.001363\n",
       "1114  161477033  0.001402  0.118758  0.996617  0.001575  0.002447\n",
       "1114  161477033  0.000295  0.073352  0.998959  0.001102  0.000495\n",
       "1114  161477033  0.002242  0.141935  0.992814  0.002292  0.002274\n",
       "1115  161477033  0.000756  0.036549  0.998183  0.001788  0.001084\n",
       "1115  161477033  0.001005  0.035199  0.997291  0.002392  0.000677\n",
       "1115  161477033  0.001706  0.052218  0.996452  0.002930  0.001160\n",
       "1115  161477033  0.000544  0.037780  0.997976  0.002193  0.000954\n",
       "1115  161477033  0.004797  0.031402  0.975602  0.031040  0.000730\n",
       "1115  161477033  0.001536  0.047045  0.995417  0.004952  0.000919\n",
       "1115  161477033  0.001008  0.045698  0.997396  0.002146  0.001353\n",
       "1115  161477033  0.004359  0.053540  0.990638  0.007279  0.001249\n",
       "1115  161477033  0.001064  0.041538  0.997744  0.002270  0.000834\n",
       "1115  161477033  0.000662  0.039044  0.997789  0.002097  0.001071"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.set_option('display.max_row', None)\n",
    "\n",
    "def compare(ensemble_preds, filter):\n",
    "    result = ensemble_preds[0][filter]\n",
    "    for preds in ensemble_preds[1:]:\n",
    "        result = result.append(preds[filter])\n",
    "    return result\n",
    "\n",
    "compare(ensemble_preds, preds.tic_id == 161477033).sort_index()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
